<?php
/**
 * Created by PhpStorm.
 * User: mohuani
 * Date: 2019/4/13
 * Time: 19:17
 */


ini_set('display_errors','on');
ini_set('error_reporting',E_ALL);

require_once "global.php";
require_once "autoload.php";


$cliClassName = $argv[1];
var_dump($cliClassName);


switch ($cliClassName) {
    case 'GetWeatherByCityKeyJob':
        $cliClass = new App\Jobs\GetWeatherByCityKeyJob();
        break;
    case 'GetWeatherByCityNameJob':
        $cliClass = new App\Jobs\GetWeatherByCityNameJob();
        break;
    default:
        $cliClass = null;
        break;
}

if ($cliClass != null) {
    $cliClass->handle();
} else {
    exit("脚本参数错误，无法执行定时脚本");
}



